package com.lyu.travel.core.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lyu.travel.core.entity.User;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 * @ProjectName: [travel]
 * @Package: [com.lyu.travel.core.mapper]
 * @ClassName: [UserMapper]
 * @Description: 用户数据接口
 * @Author: [78483]
 * @CreateDate: [2020-05-16 18:21]
 * @UpdateUser: [78483]
 * @UpdateDate: [2020-05-16 18:21]
 * @UpdateRemark: [说明本次修改内容]
 * @Version: [v1.0]
 */

public interface UserMapper extends BaseMapper<User> {
    @Select(" select * from t_user where username = #{username} and password = #{password}")
    public User findByUsernameAndPassword(String username, String password);

    @Select(" select * from t_user where username = #{username}")
    public  User findByUsername(String username);

}
